import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';

import {Observable} from "rxjs/Observable";
import 'rxjs/add/operator/map';


@Injectable()
export class TeamIndexProvider {

    constructor(public http: HttpClient) {
    }

    data = {
        'agentName': '爱中宏',
        'agentLevel': 'SMD',
        'hrefHeadPortrait': '',//头像地址
        'monthTotalPC': 15000,
        'monthTotalAPE': 1200,
        'directGroupID': 2, //直辖小组ID
        'hrefMDRT': '',
        'hasMessage': 0
    };


    /**
     * 在职人力
     * @returns {Observable<any>}
     */
    getWorkOverView(): Observable<any> {
        // return Observable.create(o => {
        //     o.next(this.data);
        // })
        return this.http.get(`/recruit/incumbent/v1/overview`);
    }
}
